class Base {
    public int x;
    public int y;
}

public class Sub extends Base {
    public int z;

    public Sub(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

    public int calculate() {
        return x + y + z;
    }

    public static void main(String[] args) {
        Sub sub = new Sub(1,2,3);
        int ret = sub.calculate();
        System.out.println(ret);
    }
}
